<form [formGroup]="sysInfoForm">
    <div class="button-item border-spe-bottom">
        <button pButton type="text" class="ui-button-danger" icon="fa fa-trash" (click)="deleteSysInfo($event)" label="删除"></button>
        <button pButton type="text" class="ui-button-info" icon="fa fa-waring" (click)="refreshSysInfo($event)" label="刷新"></button>
        <button pButton type="text" class="ui-button-info" icon="fa fa-refresh" (click)="addSysInfo($event)" label="新增"></button>
        <button pButton type="text" class="ui-button-success" icon="fa fa-check" (click)="saveUpdateSysInfo($event)" label="保存"  [disabled]="sysInfoForm.status != 'VALID'"></button>
        <button pButton type="text" class="ui-button-success" icon="fa fa-check" (click)="basisUpdate()" label="获取数据"></button>
    </div>

    <div class="container">
        <div class="ui-g-10">
            <div class="ui-g-6 form-control-row">
                <div class="ui-g-4">标志</div>
                <div class="ui-g-8"><input pInputText type="text" formControlName="sysId" style="width:100%" readonly/></div>
            </div>
            <div class="ui-g ui-g-6 ui-fluid form-control-row">
                <div class="ui-g-4">类别</div>
                <div class="ui-g-8 ui-fluid">
                    <p-dropdown [options]="frameTypes" formControlName="frameType" [style]="{'width':'100%'}"></p-dropdown>
                </div>
            </div>
            <div class="ui-g-12 form-control-row">
                <div class="ui-g-2">路径<span style="color:red;">*</span></div>
                <div class="ui-g-10"><input pInputText type="text" formControlName="sysPath" style="width:100%" pTooltip="{{ formErrors.sysPath }}"/></div>
            </div>
            <div class="ui-g-12 form-control-row">
                <div class="ui-g-2">名称<span style="color:red;">*</span></div>
                <div class="ui-g-10"><input pInputText type="text" formControlName="sysName" style="width:100%" pTooltip="{{ formErrors.sysName }}"/></div>
            </div>
            <div class="ui-g-12 form-control-row">
                <div class="ui-g-2">系统描述</div>
                <div class="ui-g-10"><textarea pInputTextarea  rows="3" formControlName="sysDesc" style="width:100%"></textarea></div>
            </div>
            <div class="ui-g-12 form-control-row">
                <div class="ui-g-2">
                    <div class="ui-g-12">系统图标</div>
                    <div class="ui-g-12">
                        <div class="sys-icon ripple sys-icon-{{sysInfo.iconImage}}" mdl-shadow="8"></div>
                    </div>
                </div>
                <div class="ui-g-10">
                    <p-dataGrid [value]="sysInfoIcons" [paginator]="true" [rows]="10">
                        <ng-template let-icon pTemplate="item">
                            <div class="ui-grid ui-grid-responsive">
                                <div class="ui-grid-row">
                                    <div class="ui-grid-col-12" style="margin-left:calc(50% - 32px);margin-top:10px;">
                                        <div class="sys-icon ripple sys-icon-{{icon}}" mdl-shadow="8"></div>
                                    </div>
                                </div>
                                <div class="ui-grid-row">
                                    <div class="ui-grid-col-12" style="margin-left:calc(50% - 5px);margin-top:-20px;">
                                        <p-radioButton formControlName="iconImage" name="iconImage" value="{{icon}}"></p-radioButton>
                                    </div>
                                </div>
                            </div>
                        </ng-template>
                    </p-dataGrid>
                </div>
            </div>
        </div>
    </div>
</form>
<p-confirmDialog #cd>
    <p-footer>
        <button type="button" pButton icon="fa fa-close" label="取消" (click)="cd.reject()"></button>
        <button type="button" pButton icon="fa fa-check" label="确定" (click)="cd.accept()"></button>
    </p-footer>
</p-confirmDialog>
